﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmCategorizacionClientes.aspx.cs" Inherits="Crosland.Automotriz.Web.wFrmCategorizacionClientes" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxLoadingPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxCallback" tagprefix="dx" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

<script src="Scripts/jquery.js" type="text/javascript"></script>   
<link href="Css/jquery.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

    function ShowGenerar() {
        PopupGenerar.Show();

    }

    function ShowMensaje() {
        PopupOk.Show();
    }

    function ShowError() {
        PopupError.Show();
    }

    function OcultarGenerar() {
        PopupGenerar.Hide();
    }

    function ShowValidacion() {
        PopupValidacion.Show();
    }

    function ShowOpcionesReporte() {
        PopupReporte.Show();
    }


    function ShowValidacion2() {
        PopupValidacion2.Show();
    }

    function openReporte1() {
        var w = screen.availWidth - 25;
        var h = screen.availHeight - 38;
        window.open('Popup/ConcentracionClientesPopup.aspx',
               'NewWindow', 'top=5,left=5, width=' + w + ',height=' + h + ',status=no, resizab le=no,scrollbars=no');
    }

    function openReporte2() {
        var w = screen.availWidth - 25;
        var h = screen.availHeight - 38;
        window.open('Popup/AcumuladoClientesPopup.aspx',
               'NewWindow', 'top=5,left=5, width=' + w + ',height=' + h + ',status=no, resizab le=no,scrollbars=no');
    }

    

</script>

    <asp:MultiView ID="mvGeneral" runat="server">

     <asp:View ID="vGenerar" runat="server">

     <div class="main-header" style="width:100%;">
                <div class="main-titulo">Asignación ABC a Clientes</div>
                <div class="main-opciones">

                </div>
     </div>
     
     
     <div class="content-form">

         <div>

         <table>
         
         <tr>
         
         <td id="tdProcesar" runat="server">
             <dx:ASPxButton ID="btnCategorizar" runat="server" Text="Procesar"
                 CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                 CssPostfix="Office2010Blue" 
                 SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                 Width="100px" AutoPostBack="False">
                 
                 <ClientSideEvents Click="function(s, e) {

	if(lblmsjA.GetText()!='' || lblmsjB.GetText()!='')
	{	
			ShowValidacion();	
	}
	else
	{
		ShowGenerar();
	}	


}" />
                 
             </dx:ASPxButton>
         </td>
         
             <td id="tdActualizar" runat="server">
             
                 <dx:ASPxButton ID="btnActualizar" runat="server" Text="Actualizar" 
                     AutoPostBack="False" ClientInstanceName="btnActualizar" 
                     CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                     CssPostfix="Office2010Blue" 
                     SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100px">
                     <ClientSideEvents Click="function(s, e) {
	PopupActualizar.Show();
}" />
                 </dx:ASPxButton>
             </td>
         
         <td>
         
             <dx:ASPxButton ID="btnSalir" runat="server" Text="Salir" 
                 CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                 CssPostfix="Office2010Blue" 
                 SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                 Width="100px" onclick="btnSalir_Click">
                 
             </dx:ASPxButton>

         </td>

         

         </tr>

         </table>
     
         </div>

          <div style="clear:both;height:15px"></div>

         <asp:Panel ID="pnCategorizar" runat="server" CssClass="content-message">
                    <asp:Label ID="lblTexto" runat="server" 
                        Text="Verifique los factores de cálculo y luego grabe."></asp:Label>
         </asp:Panel>

         <asp:Panel ID="Panel2" runat="server">               
                                            
                <div style="clear:both;height:15px"></div>

                <table cellpadding="3" cellspacing="0" class="tb-pdi-form" 
                          
                          
                    
                    
                    
                    style="border-left: 1px solid #E7E7E7; border-right: 1px solid #E7E7E7; border-top: 1px solid #E7E7E7; border-bottom: 1px none #E7E7E7; width: 791px; height: 32px;">
             
                            <tr>
                                <td class="tb-pdi-label" style="width: 235px">Año:</td>
                                <td class="tb-pdi-control" style="width: 97px">       
                                    <dx:ASPxComboBox ID="cboAño" runat="server" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" Spacing="0" 
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                        Width="75px" Height="20px" HorizontalAlign="Center" SelectedIndex="1">
                                        
                                        <Items>
                                            
                                            <dx:ListEditItem Text="2014" Value="2014" />
                                            
                                            <dx:ListEditItem Selected="True" Text="2013" Value="2013" />
                                            
                                            <dx:ListEditItem Text="2012" Value="2012" />
                                            
                                            <dx:ListEditItem Text="2011" Value="2011" />
                                            
                                            <dx:ListEditItem Text="2010" Value="2010" />
                                            
                                        </Items>
                                        
                                        <loadingpanelimage url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                        
                                        </loadingpanelimage>
                                        
                                        <loadingpanelstyle imagespacing="5px">
                                        
                                        </loadingpanelstyle>
                                        
                                        <buttonstyle width="13px">
                                        
                                        </buttonstyle>
                                        
                                    </dx:ASPxComboBox>
                                </td>
                                <td class="tb-pdi-label" style="width: 90px">Mes:</td>
                                <td class="tb-pdi-control" style="width: 151px"> 
                                    <dx:ASPxComboBox ID="cboMes" runat="server" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" Spacing="0" 
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                        Width="120px" Height="20px" HorizontalAlign="Center">
                                        
                                        <Items>
                                            
                                            <dx:ListEditItem Text="Enero" Value="1" />
                                            
                                            <dx:ListEditItem Text="Febrero" Value="2" />
                                            
                                            <dx:ListEditItem Text="Marzo" Value="3" />
                                            
                                            <dx:ListEditItem Text="Abril" Value="4" />
                                            
                                            <dx:ListEditItem Text="Mayo" Value="5" />
                                            
                                            <dx:ListEditItem Text="Junio" Value="6" />
                                            
                                            <dx:ListEditItem Text="Julio" Value="7" />
                                            
                                            <dx:ListEditItem Text="Agosto" Value="8" />
                                            
                                            <dx:ListEditItem Text="Setiembre" Value="9" />
                                            
                                            <dx:ListEditItem Text="Octubre" Value="10" />
                                            
                                            <dx:ListEditItem Text="Noviembre" Value="11" />
                                            
                                            <dx:ListEditItem Text="Diciembre" Value="12" />
                                            
                                        </Items>
                                        
                                        <loadingpanelimage url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                        
                                        </loadingpanelimage>
                                        
                                        <loadingpanelstyle imagespacing="5px">
                                        
                                        </loadingpanelstyle>
                                        
                                        <buttonstyle width="13px">
                                        
                                        </buttonstyle>
                                        
                                    </dx:ASPxComboBox>
                                </td>
                                <td class="tb-pdi-label" style="width: 257px"># de Meses a Considerar:</td>
                                <td class="tb-pdi-control" style="width: 61px">
                                    <dx:ASPxComboBox ID="cboMesAcumulado" runat="server" 
                                        ClientInstanceName="cboMesAcumulado" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" HorizontalAlign="Center" SelectedIndex="3" 
                                        Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                        Width="50px">
                                        
                                        <Items>
                                            
                                            <dx:ListEditItem Text="1" Value="1" />
                                            
                                            <dx:ListEditItem Text="2" Value="2" />
                                            
                                            <dx:ListEditItem Text="3" Value="3" />
                                            
                                            <dx:ListEditItem Selected="True" Text="4" Value="4" />
                                            
                                            <dx:ListEditItem Text="5" Value="5" />
                                            
                                            <dx:ListEditItem Text="6" Value="6" />
                                            
                                            <dx:ListEditItem Text="7" Value="7" />
                                            
                                            <dx:ListEditItem Text="8" Value="8" />
                                            
                                        </Items>
                                        
                                        <ItemStyle HorizontalAlign="Center" />
                                        
                                        <loadingpanelimage url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                        
                                        </loadingpanelimage>
                                        
                                        <loadingpanelstyle imagespacing="5px">
                                        
                                        </loadingpanelstyle>
                                        
                                        <buttonstyle width="13px">
                                        
                                        </buttonstyle>
                                        
                                    </dx:ASPxComboBox>
                            </td>
                            
                            </tr>                

                            <tr>

                                <td class="tb-pdi-label" style="width: 235px">Categoria A desde:</td>
                                <td class="tb-pdi-control" style="width: 61px; text-align: center;">
                                    <dx:ASPxLabel ID="txtPorcA" runat="server" BackColor="White" 
                                        ClientInstanceName="txtPorcA" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" ForeColor="Black" Height="20px" Text="0" 
                                        Width="50px">
                                        
                                        <Border BorderStyle="Solid" BorderWidth="1px" BorderColor="#ABBAD0" />
                                        
                                    </dx:ASPxLabel>
                                </td>

                                <td class="tb-pdi-label" style="width: 90px">hasta:</td>
                                <td class="tb-pdi-control">
                                    <dx:ASPxTextBox ID="txtPorcA1" runat="server" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" Height="20px" HorizontalAlign="Center" 
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="50" 
                                        Width="50px" ClientInstanceName="txtPorcA1">
                                        
                                        <ClientSideEvents KeyPress="function(s, e) {
		if( (e.htmlEvent.keyCode == 189 || e.htmlEvent.keyCode == 109 || e.htmlEvent.keyCode == 97) ||
e.htmlEvent.keyCode &gt;= 48 &amp;&amp; e.htmlEvent.keyCode &lt;= 57 || e.htmlEvent.keyCode &lt;= 48 &amp;&amp; e.htmlEvent.keyCode &gt;= 57 ||
e.htmlEvent.keyCode &gt;= 65 &amp;&amp; e.htmlEvent.keyCode &lt;= 90 || e.htmlEvent.keyCode &lt;= 97 &amp;&amp; e.htmlEvent.keyCode &lt;= 122 ||
      e.htmlEvent.keyCode &gt;= 96 &amp;&amp; e.htmlEvent.keyCode &lt;= 105 ) {
    return true;
}
  else {
         return _aspxPreventEvent(e.htmlEvent);
  }
}" KeyUp="function(s, e) {
var a=eval(txtPorcA.GetText())
var b=eval(txtPorcA1.GetText())
var c=eval(txtPorcB1.GetText())

if(txtPorcA1.GetText()!='')
{
	if(txtPorcA1.GetText()&gt;0)
	{
		if(a&lt;b &amp;&amp; b&lt;c)
		{
			var n = eval(txtPorcA1.GetText());
			lblmsjA.SetText('');
			txtPorcB.SetText(n);
		}
		else
		{
			txtPorcB.SetText('');
			lblmsjA.SetText('Debe ser mayor que A desde y/o menor que B hasta ');
		}
	
	}
	else
	{
	txtPorcB.SetText('');
	lblmsjA.SetText('El valor debe ser mayor a cero');
	}

}
else
{
	txtPorcB.SetText('');
}



}" />
                                        
                                    </dx:ASPxTextBox>
                                </td>

                                <td class="tb-pdi-label" colspan="2">% de Venta

                                &nbsp;&nbsp;
                                     <dx:ASPxLabel ID="lblmsjA" 
                                        runat="server" clientinstancename="lblmsjA" forecolor="Red" text="" 
                                        xmlns:dx="devexpress.web.aspxgridview">
                                         
                                    </dx:ASPxLabel>
                                   </td>
                            </tr>


                             <tr>

                                <td class="tb-pdi-label" style="width: 235px">Categoria B mayor que:</td>
                                <td class="tb-pdi-control" style="width: 61px; text-align: center;">
                                    <dx:ASPxLabel ID="txtPorcB" runat="server" ClientInstanceName="txtPorcB" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" Height="20px" Text="50" Width="50px" 
                                        BackColor="White" ForeColor="Black">
                                        
                                        <Border BorderColor="#ABBAD0" BorderStyle="Solid" BorderWidth="1px" />
                                        
                                    </dx:ASPxLabel>
                                </td>

                                <td class="tb-pdi-label" style="width: 90px">hasta:</td>
                                <td class="tb-pdi-control">
                                    <dx:ASPxTextBox ID="txtPorcB1" runat="server" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" Height="20px" HorizontalAlign="Center" 
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="80" 
                                        Width="50px" ClientInstanceName="txtPorcB1">
                                        
                                        <ClientSideEvents KeyPress="function(s, e) {
		if( (e.htmlEvent.keyCode == 189 || e.htmlEvent.keyCode == 109) ||
(e.htmlEvent.keyCode &gt;= 48 &amp;&amp; e.htmlEvent.keyCode &lt;= 57) || (e.htmlEvent.keyCode &lt;= 48 &amp;&amp; e.htmlEvent.keyCode &gt;= 57)||
(e.htmlEvent.keyCode &lt;= 65 &amp;&amp; e.htmlEvent.keyCode &gt;= 90)||(e.htmlEvent.keyCode &lt; 97 &amp;&amp; e.htmlEvent.keyCode &gt; 122)||
      (e.htmlEvent.keyCode &gt;= 96 &amp;&amp; e.htmlEvent.keyCode &lt;= 105) ) {
    return true; }
  else {
         return _aspxPreventEvent(e.htmlEvent); 
  }
}" KeyUp="function(s, e) {
var a=eval(txtPorcB1.GetText())
var b=eval(txtPorcB.GetText())
var c=eval(txtPorcC1.GetText())
if(b&lt;a &amp;&amp; a&lt;c){

lblmsjB.SetText('');
if(txtPorcB1.GetText()!=''){
var n = eval(txtPorcB1.GetText());
txtPorcC.SetText(n);

}else{
txtPorcC.SetText('');
}

}else{

lblmsjB.SetText('Debe ser mayor que B desde y/o menor que 100 ');

}

}" />
                                        
                                    </dx:ASPxTextBox>
                                 </td>
                                <td class="tb-pdi-label" colspan="2">% de Venta
                                     &nbsp;&nbsp;
                                     <dx:ASPxLabel ID="lblmsjB" 
                                        runat="server" clientinstancename="lblmsjB" forecolor="Red" text="" 
                                        xmlns:dx="devexpress.web.aspxgridview">
                                         
                                    </dx:ASPxLabel>
                                 </td>

                            </tr>

                            <tr>
                             <td class="tb-pdi-label" style="width: 235px">Categoria C mayor que:</td>
                               
                                <td class="tb-pdi-control" style="width: 61px; text-align: center;">
                                    <dx:ASPxLabel ID="txtPorcC" runat="server" BackColor="White" 
                                        ClientInstanceName="txtPorcC" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" ForeColor="Black" Height="20px" Text="80" 
                                        Width="50px">
                                        
                                       <Border BorderColor="#ABBAD0" BorderStyle="Solid" BorderWidth="1px" />
                                        
                                    </dx:ASPxLabel>
                                </td>

                                <td class="tb-pdi-label" style="width: 90px">hasta:</td>
                                <td class="tb-pdi-control">
                                    <dx:ASPxTextBox ID="txtPorcC1" runat="server" ClientInstanceName="txtPorcC1" 
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue" Height="20px" HorizontalAlign="Center" 
                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="100" 
                                        Width="50px" Enabled="False">
                                        <ClientSideEvents KeyPress="function(s, e) {
		if( (e.htmlEvent.keyCode == 189 || e.htmlEvent.keyCode == 109) ||
(e.htmlEvent.keyCode &gt;= 48 &amp;&amp; e.htmlEvent.keyCode &lt;= 57) || (e.htmlEvent.keyCode &lt;= 48 &amp;&amp; e.htmlEvent.keyCode &gt;= 57)||
(e.htmlEvent.keyCode &lt;= 65 &amp;&amp; e.htmlEvent.keyCode &gt;= 90)||(e.htmlEvent.keyCode &lt; 97 &amp;&amp; e.htmlEvent.keyCode &gt; 122)||
      (e.htmlEvent.keyCode &gt;= 96 &amp;&amp; e.htmlEvent.keyCode &lt;= 105) ) {
    return true; }
  else {
         return _aspxPreventEvent(e.htmlEvent); 
  }
}" KeyUp="function(s, e) {
var a=eval(txtPorcB1.GetText())
var b=eval(txtPorcB.GetText())
var c=eval(txtPorcC1.GetText())
if(b&lt;a &amp;&amp; a&lt;c){

lblmsjB.SetText('');
if(txtPorcB1.GetText()!=''){
var n = eval(txtPorcB1.GetText());
txtPorcC.SetText(n);

}else{
txtPorcC.SetText('');
}

}else{

lblmsjB.SetText('Debe ser mayor que B desde y/o menor que 100 ');

}

}" />
                                    </dx:ASPxTextBox>
                                </td>
                                <td class="tb-pdi-label" colspan="2">% de Venta</td>
                            </tr>
                            <tr>
                            <td colspan="6" class="tb-pdi-label" style="height: 10px"></td>
                            
                            </tr>

                            <tr>
                            <td colspan="6" class="tb-pdi-label">Usuarios a los que se les notificará:</td>
                            
                            </tr>

                            <tr>
                            <td colspan="6" class="tb-pdi-label">

                                <dx:ASPxGridView ID="gvUsuarios" runat="server" AutoGenerateColumns="False" 
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                    CssPostfix="Office2010Blue" Width="433px">
                                    <Columns>
                                        <dx:GridViewDataTextColumn Caption="ID" VisibleIndex="0" FieldName="ID_USUARIO" 
                                            Width="58px">
                                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Caption="Nombres y Apellidos" VisibleIndex="1" 
                                            FieldName="NOMBRE_APELLIDO" Width="100px">
                                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </dx:GridViewDataTextColumn>
                                        <dx:GridViewDataTextColumn Caption="Correo" VisibleIndex="2" FieldName="CORREO" 
                                            Width="100px">
                                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                        </dx:GridViewDataTextColumn>
                                    </Columns>
                                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                        </LoadingPanelOnStatusBar>
                                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                        </LoadingPanel>
                                    </Images>
                                    <ImagesFilterControl>
                                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                        </LoadingPanel>
                                    </ImagesFilterControl>
                                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                        CssPostfix="Office2010Blue">
                                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                        </Header>
                                        <LoadingPanel ImageSpacing="5px">
                                        </LoadingPanel>
                                    </Styles>
                                    <StylesPager>
                                        <PageNumber ForeColor="#3E4846">
                                        </PageNumber>
                                        <Summary ForeColor="#1E395B">
                                        </Summary>
                                    </StylesPager>
                                    <StylesEditors ButtonEditCellSpacing="0">
                                        <ProgressBar Height="21px">
                                        </ProgressBar>
                                    </StylesEditors>
                                </dx:ASPxGridView>

                            </td>
                            </tr>
                </table>

        </asp:Panel>


     </div>
             
     </asp:View>

    <asp:View ID="vHistorial" runat="server">
    
    <div class="main-header" style="width:100%;">
                <div class="main-titulo">Categoria ABC Clientes</div>
                <div class="main-opciones">

                </div>
     </div>


    <div class="content-form">

        <div>

             <table>
         
                 <tr>
         
                     <td>

                         <dx:ASPxButton ID="btnNuevo" runat="server" AutoPostBack="False" 
                             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue" onclick="btnNuevo_Click" 
                             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Nuevo" 
                             Width="100px">
                             
                         </dx:ASPxButton>

                     </td>
                     <td>
                          <dx:ASPxButton ID="btnModificar" runat="server" AutoPostBack="False" 
                             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue"
                             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Modificar" 
                             Width="100px" ClientInstanceName="btnModificar" 
                              onclick="btnModificar_Click">
                              
                         </dx:ASPxButton>
                     
                     </td>
                                       
                     <td>
                     
                         <dx:ASPxButton ID="btnReporte" runat="server" AutoPostBack="False" 
                             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue" 
                             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                             Text="Ver Reporte" Width="110px" onclick="btnReporte_Click">
                             
                         </dx:ASPxButton>
                     
                     </td>

                     <td>
                     
                         <dx:ASPxButton ID="btnAtras" runat="server" AutoPostBack="False" 
                             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue" onclick="btnAtras_Click" 
                             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                             Width="100px">
                             
                         </dx:ASPxButton>
                     
                     </td>

                 </tr>

             </table>

        </div>

         <div style="clear:both;height:15px"></div>

         <asp:Panel ID="pnHistorial" runat="server" CssClass="content-message">
                    <asp:Label ID="lblHistorial" runat="server" 
                        Text="Seleccione un elemnto para visualizar su detalle."></asp:Label>
         </asp:Panel>

         <asp:Panel ID="Panel1" runat="server">               
           <div style="clear:both;height:15px"></div>

             <dx:ASPxGridView ID="gvHistorial" runat="server" AutoGenerateColumns="False" 
                 CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                 CssPostfix="Office2010Blue" EnableCallBacks="False" Width="1200px" 
                 onpageindexchanged="gvHistorial_PageIndexChanged" 
                 onrowcommand="gvHistorial_RowCommand" onprerender="gvHistorial_PreRender" 
                 KeyFieldName="ID_CAT">
                 <Columns>
                     
                     <dx:GridViewCommandColumn VisibleIndex="0" Width="10px">
                         <clearfilterbutton visible="True">
                         </clearfilterbutton>
                     </dx:GridViewCommandColumn>
                     
                     <dx:GridViewDataTextColumn Caption="Nº" FieldName="ID_CAT" VisibleIndex="1" 
                         Width="30px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     
                     <dx:GridViewDataTextColumn Caption="Año" FieldName="ANIO" VisibleIndex="2" 
                         Width="50px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     
                     
                     <dx:GridViewDataTextColumn Caption="Mes" FieldName="MES" VisibleIndex="3" 
                         Width="80px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     
                     <dx:GridViewDataDateColumn Caption="Creado" FieldName="FEC_CREACION" 
                         UnboundType="DateTime" VisibleIndex="4" Width="120px">
                         <propertiesdateedit displayformatstring="dd.MM.yyyy HH:mm">
                         </propertiesdateedit>
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataDateColumn>
                     
                     <dx:GridViewDataTextColumn Caption="Creado por" FieldName="USUARIO" 
                         VisibleIndex="5" Width="90px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     
                     <dx:GridViewDataDateColumn Caption="Modificado" FieldName="FEC_ACTUALIZA" 
                         UnboundType="DateTime" VisibleIndex="6" Width="120px">
                         <PropertiesDateEdit DisplayFormatString="dd.MM.yyyy HH:mm">
                         </PropertiesDateEdit>
                         <HeaderStyle HorizontalAlign="Center" />
                         <CellStyle HorizontalAlign="Center">
                         </CellStyle>
                     </dx:GridViewDataDateColumn>
                     <dx:GridViewDataTextColumn Caption="Modificado por" FieldName="ACTUALIZADO" 
                         UnboundType="String" VisibleIndex="7" Width="90px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     <dx:GridViewDataTextColumn Caption="A desde(%) &lt;br /&gt; A hasta (%)" 
                         FieldName="PORC_A" VisibleIndex="8" Width="110px">
                         <HeaderStyle HorizontalAlign="Center" Wrap="True" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     
                     <dx:GridViewDataTextColumn Caption="B desde(%) &lt;br /&gt; B hasta(%)" 
                         FieldName="PORC_B" VisibleIndex="9" Width="110px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     
                     <dx:GridViewDataTextColumn Caption="C desde(%) &lt;br /&gt; C hasta(%)" 
                         VisibleIndex="10" FieldName="PORC_C" Width="110px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <cellstyle horizontalalign="Center">
                         </cellstyle>
                     </dx:GridViewDataTextColumn>
                     
                     <dx:GridViewDataTextColumn Caption="#MesCons." FieldName="MES_ACU" 
                         VisibleIndex="11" Width="30px">
                         <HeaderStyle HorizontalAlign="Center" />
                         <CellStyle HorizontalAlign="Center">
                         </CellStyle>
                     </dx:GridViewDataTextColumn>
                     <dx:GridViewDataTextColumn Caption="Detalle" VisibleIndex="12">
                         <DataItemTemplate>
                             <asp:ImageButton ID="btnDetalle" runat="server" 
                                 CommandArgument='<%# Bind("ID_CAT") %>' CommandName="Detalle" 
                                 ImageUrl="~/Images/edit.png" />
                         </DataItemTemplate>
                         <HeaderStyle HorizontalAlign="Center" />
                         <CellStyle HorizontalAlign="Center">
                         </CellStyle>
                     </dx:GridViewDataTextColumn>
                     
                 </Columns>
                 
                 <SettingsBehavior AllowFocusedRow="True" />
                 
                 <Settings ShowFilterRow="True" />
                 
                 <images spritecssfilepath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                 
                 <loadingpanelonstatusbar url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                 
                 </loadingpanelonstatusbar>
                 
                 <loadingpanel url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                 
                 </loadingpanel>
                 
                 </images>
                 
                 <imagesfiltercontrol>
                 
                 <loadingpanel url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                 
                 </loadingpanel>
                 
                 </imagesfiltercontrol>
                 
                 <styles cssfilepath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                     csspostfix="Office2010Blue">
                 
                 <header imagespacing="5px" sortingimagespacing="5px">
                 
                 </header>
                 
                 <loadingpanel imagespacing="5px">
                 
                 </loadingpanel>
                 
                 </styles>
                 
                 <stylespager>
                 
                 <pagenumber forecolor="#3E4846">
                 
                 </pagenumber>
                 
                 <summary forecolor="#1E395B">
                 
                 </summary>
                 
                 </stylespager>
                 
                 <styleseditors buttoneditcellspacing="0">
                 
                 <progressbar height="21px">
                 
                 </progressbar>
                 
                 </styleseditors>
                 
             </dx:ASPxGridView>

         </asp:Panel>

    </div>

    </asp:View>

    <asp:View ID="vDetalleHistorial" runat="server">
    
    <div class="main-header" style="width:100%;">
                <div class="main-titulo">Detalle de Historial</div>
                <div class="main-opciones">

                </div>
     </div>
    
    <div class="content-form">
    
    <div>

             <table>
         
                 <tr>
                     <td>

                         <dx:ASPxButton ID="btnConsultar" runat="server" AutoPostBack="False" 
                             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue" 
                             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Consultar" 
                             Width="100px" onclick="btnConsultar_Click">
                             
                         </dx:ASPxButton>

                     </td>
                     <td>

                         <dx:ASPxButton ID="btnHistorialCab" runat="server" AutoPostBack="False" 
                             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue" 
                             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                             Width="100px" onclick="btnHistorialCab_Click">
                             
                         </dx:ASPxButton>

                     </td>

                 </tr>

             </table>

        </div>

        <div style="clear:both;height:15px"></div>
        
        <asp:Panel ID="pnDetalleHistorial" runat="server" CssClass="content-message">
                    <asp:Label ID="lblDetalleHistorial" runat="server" 
                        Text="Contenido del historial seleccionado."></asp:Label>
        </asp:Panel>
        <div style="clear:both;height:15px">
        </div>
        <dx:ASPxGridView ID="gvDetalleHistorial" runat="server" 
            AutoGenerateColumns="False" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" DataSourceID="ObjectDataSource2" 
            EnableCallBacks="False" Width="750px" KeyFieldName="RUC_CLIENTE">
            
            <totalsummary>
            
            <dx:ASPxSummaryItem DisplayFormat="n2" FieldName="VTA_ACUMULADA" 
                ShowInColumn="Venta $" SummaryType="Sum" />
            
            </totalsummary>
            
            <groupsummary>
            
            <dx:ASPxSummaryItem DisplayFormat="n2" FieldName="VTA_ACUMULADA" 
                ShowInGroupFooterColumn="Venta $" SummaryType="Sum" />
            
            <dx:ASPxSummaryItem FieldName="DES_CLIENTE" ShowInGroupFooterColumn="Factor" 
                SummaryType="Count" />
            
            </groupsummary>
            
            <Columns>
                
                <dx:GridViewDataTextColumn Caption="Ruc" FieldName="RUC_CLIENTE" 
                    VisibleIndex="0">
                    <HeaderStyle HorizontalAlign="Center" />
                    <cellstyle horizontalalign="Center">
                    </cellstyle>
                </dx:GridViewDataTextColumn>
                
                <dx:GridViewDataTextColumn Caption="Cliente" FieldName="DES_CLIENTE" 
                    VisibleIndex="1">
                    <HeaderStyle HorizontalAlign="Center" />
                    <cellstyle horizontalalign="Center">
                    </cellstyle>
                </dx:GridViewDataTextColumn>
                
                <dx:GridViewDataTextColumn Caption="Venta $" FieldName="VTA_ACUMULADA" 
                    SortIndex="0" SortOrder="Descending" VisibleIndex="2">
                    <propertiestextedit displayformatstring="n0">
                        
                    </propertiestextedit>
                    <HeaderStyle HorizontalAlign="Center" />
                    <cellstyle horizontalalign="Center">
                    </cellstyle>
                </dx:GridViewDataTextColumn>
                
                <dx:GridViewDataTextColumn Caption="%Participacion" FieldName="FACTOR" 
                    VisibleIndex="3">
                    <HeaderStyle HorizontalAlign="Center" />
                    <cellstyle horizontalalign="Center">
                    </cellstyle>
                </dx:GridViewDataTextColumn>
                
                <dx:GridViewDataTextColumn Caption="%Acumulado" FieldName="DISTRIBUCION" 
                    VisibleIndex="4">
                    <HeaderStyle HorizontalAlign="Center" />
                    <cellstyle horizontalalign="Center">
                    </cellstyle>
                </dx:GridViewDataTextColumn>
                
                <dx:GridViewDataTextColumn Caption="Categoria" FieldName="CATEGORIA" 
                    VisibleIndex="5">
                    <HeaderStyle HorizontalAlign="Center" />
                    <cellstyle horizontalalign="Center">
                    </cellstyle>
                </dx:GridViewDataTextColumn>
                
            </Columns>
            
            <SettingsBehavior AllowFocusedRow="True" />
            
            <settingspager pagesize="50">
            
            </settingspager>
            
            <Settings ShowGroupPanel="True" ShowFooter="True" 
                ShowGroupFooter="VisibleAlways" />
            
            <images spritecssfilepath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            
            <loadingpanelonstatusbar url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            
            </loadingpanelonstatusbar>
            
            <loadingpanel url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            
            </loadingpanel>
            
            </images>
            
            <imagesfiltercontrol>
            
            <loadingpanel url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            
            </loadingpanel>
            
            </imagesfiltercontrol>
            
            <styles cssfilepath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                csspostfix="Office2010Blue">
            
            <header imagespacing="5px" sortingimagespacing="5px">
            
            </header>
            
            <loadingpanel imagespacing="5px">
            
            </loadingpanel>
            
            </styles>
            
            <stylespager>
            
            <pagenumber forecolor="#3E4846">
            
            </pagenumber>
            
            <summary forecolor="#1E395B">
            
            </summary>
            
            </stylespager>
            
            <styleseditors buttoneditcellspacing="0">
            
            <progressbar height="21px">
            
            </progressbar>
            
            </styleseditors>
            
        </dx:ASPxGridView>

    </div>



    </asp:View>



    <asp:View ID="vDetalleCliente" runat="server">
    
    <div class="main-header" style="width:100%;">
                <div class="main-titulo">Detalle de Ventas</div>
                <div class="main-opciones">

                </div>
     </div>
    
    <div class="content-form">
    
    <div>

             <table>
         
                 <tr>
                     <td>

                         <dx:ASPxButton ID="btnSalirCliente" runat="server" AutoPostBack="False" 
                             CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                             CssPostfix="Office2010Blue" 
                             SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                             Width="100px" onclick="btnSalirCliente_Click">
                             
                         </dx:ASPxButton>

                     </td>

                 </tr>

             </table>

        </div>

        <div style="clear:both;height:15px"></div>
        
        <asp:Panel ID="Panel3" runat="server" CssClass="content-message">
                    <asp:Label ID="Label1" runat="server" 
                        Text="Compras del Cliente por Año y Mes."></asp:Label>
        </asp:Panel>
        <div style="clear:both;height:15px">
        </div>
        <dx:ASPxGridView ID="gvDetalleCliente" runat="server" 
            AutoGenerateColumns="False" 
            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue" 
            EnableCallBacks="False" Width="714px" DataSourceID="ObjectDataSource3" 
            ClientInstanceName="gvDetalleCliente">
            
            <totalsummary>
            
            <dx:ASPxSummaryItem DisplayFormat="n0" FieldName="IMP_VVTA_DOLAR" 
                ShowInColumn="Venta$" SummaryType="Sum" ShowInGroupFooterColumn="Venta$" />
            
            </totalsummary>
            
            <Columns>
                <dx:GridViewDataTextColumn Caption="Año" FieldName="ANIO" VisibleIndex="2" 
                    SortIndex="0" SortOrder="Descending">
                    <HeaderStyle HorizontalAlign="Center" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Mes" FieldName="MES" VisibleIndex="3">
                    <HeaderStyle HorizontalAlign="Center" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Ruc" FieldName="RUC_CLIENTE" 
                    VisibleIndex="0">
                    <HeaderStyle HorizontalAlign="Center" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Cliente" FieldName="DES_CLIENTE" 
                    VisibleIndex="1">
                    <HeaderStyle HorizontalAlign="Center" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Venta$" FieldName="IMP_VVTA_DOLAR" 
                    VisibleIndex="4">
                    <PropertiesTextEdit DisplayFormatString="n2">
                    </PropertiesTextEdit>
                    <HeaderStyle HorizontalAlign="Center" />
                    <CellStyle HorizontalAlign="Center">
                    </CellStyle>
                </dx:GridViewDataTextColumn>
            </Columns>
            
            <settingspager Visible="False">
            
            </settingspager>
            
            <Settings ShowFooter="True" ShowGroupedColumns="True" 
                ShowGroupFooter="VisibleAlways" />
            
            <images spritecssfilepath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            
            <loadingpanelonstatusbar url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            
            </loadingpanelonstatusbar>
            
            <loadingpanel url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            
            </loadingpanel>
            
            </images>
            
            <imagesfiltercontrol>
            
            <loadingpanel url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            
            </loadingpanel>
            
            </imagesfiltercontrol>
            
            <styles cssfilepath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                csspostfix="Office2010Blue">
            
            <header imagespacing="5px" sortingimagespacing="5px">
            
            </header>
            
            <loadingpanel imagespacing="5px">
            
            </loadingpanel>
            
            </styles>
            
            <stylespager>
            
            <pagenumber forecolor="#3E4846">
            
            </pagenumber>
            
            <summary forecolor="#1E395B">
            
            </summary>
            
            </stylespager>
            
            <styleseditors buttoneditcellspacing="0">
            
            <progressbar height="21px">
            
            </progressbar>
            
            </styleseditors>
            
        </dx:ASPxGridView>

    </div>



    </asp:View>


    </asp:MultiView>

    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="Listar" 
        
        TypeName="Crosland.Automotriz.Logic.Linq.clsT_Ven_Categoria_Clientes_DetLogic">
        <SelectParameters>
            <asp:SessionParameter Name="idCat" SessionField="ID_CAT" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="Listar" 
        TypeName="Crosland.Automotriz.Logic.Linq.clsTh_Ven_Det_Categoria_ClienteLogic">
        <SelectParameters>
            <asp:SessionParameter Name="id_cab" SessionField="ID_CAT" Type="Int32" />
            <asp:SessionParameter Name="ruc_cliente" SessionField="ID_RUC" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <br />

    <dx:ASPxPopupControl ID="PopupGenerar" runat="server" 
        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
        HeaderText="Mensaje" Height="140px" 
        SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px" 
        AllowDragging="True" ClientInstanceName="PopupGenerar" EnableViewState="False" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter">
        <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
        </LoadingPanelImage>
        <CloseButtonStyle>
            <Paddings Padding="0px" />
        </CloseButtonStyle>
        <ContentStyle>
            <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
        </ContentStyle>
        <HeaderStyle>
        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
            PaddingTop="4px" />
        </HeaderStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <br />
    <dx:ASPxPanel ID="ASPxPanel1" runat="server" Height="67px" Width="290px">
        <panelcollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            
            <table>
                <tr>
                    <td colspan="2">
                    <center>
                    Esta seguro de realizar la categorizacion de clientes?.
                    </center>
                    </td>
                </tr>
                <tr>
                    <td colspan="2"></td>
                </tr>

                <tr>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnConfirmar" runat="server" Text="Si" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" OnClick="btnConfirmar_Click" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupGenerar.Hide();
	e.processOnServer = true;
	Callback.PerformCallback();
	LoadingPanel.Show();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnNo" runat="server" Text="No" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupGenerar.Hide();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                </tr>

            </table>
                
            </dx:PanelContent>
        </panelcollection>
    </dx:ASPxPanel>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
    <br />

    <dx:ASPxPopupControl ID="PopupActualizar" runat="server" 
        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
        HeaderText="Mensaje" Height="140px" 
        SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px" 
        AllowDragging="True" ClientInstanceName="PopupActualizar" EnableViewState="False" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter">
        <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
        </LoadingPanelImage>
        <CloseButtonStyle>
            <Paddings Padding="0px" />
        </CloseButtonStyle>
        <ContentStyle>
            <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
        </ContentStyle>
        <HeaderStyle>
        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
            PaddingTop="4px" />
        </HeaderStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <br />
    <dx:ASPxPanel ID="ASPxPanel7" runat="server" Height="67px" Width="290px">
        <panelcollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            
            <table>
                <tr>
                    <td colspan="2">
                    <center>
                        Esta seguro de actualizar los datos de categorización ?</center>
                    </td>
                </tr>
                <tr>
                    <td colspan="2"></td>
                </tr>

                <tr>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnConfirmarA" runat="server" Text="Si" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" AutoPostBack="False" ClientInstanceName="btnConfirmarA" 
                            OnClick="btnConfirmarA_Click">
                            <ClientSideEvents Click="function(s, e) {
	PopupActualizar.Hide();
	e.processOnServer = true;
	Callback.PerformCallback();
	LoadingPanel.Show();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnNo0" runat="server" Text="No" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupActualizar.Hide();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                </tr>

            </table>
                
            </dx:PanelContent>
        </panelcollection>
    </dx:ASPxPanel>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
    <br />
    <br />

    <dx:ASPxPopupControl ID="PopupOk" runat="server" 
        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
        HeaderText="Mensaje" Height="120px" 
        SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px" 
        AllowDragging="True" ClientInstanceName="PopupOk" EnableViewState="False" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter">
        <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
        </LoadingPanelImage>
        <CloseButtonStyle>
            <Paddings Padding="0px" />
        </CloseButtonStyle>
        <ContentStyle>
            <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
        </ContentStyle>
        <HeaderStyle>
        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
            PaddingTop="4px" />
        </HeaderStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <br />
    <dx:ASPxPanel ID="ASPxPanel2" runat="server" Height="67px" Width="290px">
        <panelcollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            
            <table>
                <tr>
                    <td>
                    <center>
                        Proceso de Categorización realizado Satisfactoriamente...!!!</center>
                    </td>
                </tr>
                <tr>
                    <td></td>
                </tr>

                <tr>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnConfirmar0" runat="server" Text="OK" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupOk.Hide();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                </tr>

            </table>
                
            </dx:PanelContent>
        </panelcollection>
    </dx:ASPxPanel>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
    <br />

    <dx:ASPxPopupControl ID="PopupError" runat="server" 
        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
        HeaderText="Mensaje" Height="120px" 
        SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px" 
        AllowDragging="True" ClientInstanceName="PopupError" EnableViewState="False" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter">
        <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
        </LoadingPanelImage>
        <CloseButtonStyle>
            <Paddings Padding="0px" />
        </CloseButtonStyle>
        <ContentStyle>
            <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
        </ContentStyle>
        <HeaderStyle>
        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
            PaddingTop="4px" />
        </HeaderStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <br />
    <dx:ASPxPanel ID="ASPxPanel3" runat="server" Height="67px" Width="290px">
        <panelcollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            
            <table style="width: 281px">
                <tr>
                    <td>
                    <center style="color: #FF0000">
                        Error al Procesar la Categorización...!!!</center>
                    </td>
                </tr>
                <tr>
                    <td></td>
                </tr>

                <tr>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnError" runat="server" Text="OK" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupError.Hide();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                </tr>

            </table>
                
            </dx:PanelContent>
        </panelcollection>
    </dx:ASPxPanel>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
    <br />

    <dx:ASPxPopupControl ID="PopupValidacion" runat="server" 
        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
        HeaderText="Mensaje" Height="120px" 
        SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px" 
        AllowDragging="True" ClientInstanceName="PopupValidacion" EnableViewState="False" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter">
        <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
        </LoadingPanelImage>
        <CloseButtonStyle>
            <Paddings Padding="0px" />
        </CloseButtonStyle>
        <ContentStyle>
            <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
        </ContentStyle>
        <HeaderStyle>
        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
            PaddingTop="4px" />
        </HeaderStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <br />
    <dx:ASPxPanel ID="ASPxPanel4" runat="server" Height="67px" Width="290px">
        <panelcollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            
            <table style="width: 281px">
                <tr>
                    <td>
                    <center style="color: #FF0000">
                        Datos ingresados de manera Incorrecta...!!!</center>
                    </td>
                </tr>
                <tr>
                    <td></td>
                </tr>

                <tr>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnError0" runat="server" Text="OK" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupValidacion.Hide();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                </tr>

            </table>
                
            </dx:PanelContent>
        </panelcollection>
    </dx:ASPxPanel>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
    <br />

    <dx:ASPxPopupControl ID="PopupValidacion2" runat="server" 
        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
        HeaderText="Mensaje" Height="120px" 
        SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px" 
        AllowDragging="True" ClientInstanceName="PopupValidacion2" EnableViewState="False" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter">
        <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
        </LoadingPanelImage>
        <CloseButtonStyle>
            <Paddings Padding="0px" />
        </CloseButtonStyle>
        <ContentStyle>
            <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
        </ContentStyle>
        <HeaderStyle>
        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
            PaddingTop="4px" />
        </HeaderStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <br />
    <dx:ASPxPanel ID="ASPxPanel6" runat="server" Height="67px" Width="290px">
        <panelcollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            
            <table style="width: 281px">
                <tr>
                    <td>
                    <center style="color: #FF0000">
                        La categorización para el año y mes seleccionados<br /> ya fueron 
                        procesados...!!!</center>
                    </td>
                </tr>
                <tr>
                    <td></td>
                </tr>

                <tr>
                    <td>
                    <center>
                        <dx:ASPxButton ID="btnError2" runat="server" Text="OK" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="50px" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupValidacion2.Hide();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                </tr>

            </table>
                
            </dx:PanelContent>
        </panelcollection>
    </dx:ASPxPanel>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
    <br />
    <br />

    <dx:ASPxPopupControl ID="PopupReporte" runat="server" 
        CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
        HeaderText="Mensaje" Height="120px" 
        SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px" 
        AllowDragging="True" ClientInstanceName="PopupReporte" EnableViewState="False" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter">
        <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
        </LoadingPanelImage>
        <CloseButtonStyle>
            <Paddings Padding="0px" />
        </CloseButtonStyle>
        <ContentStyle>
            <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
        </ContentStyle>
        <HeaderStyle>
        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
            PaddingTop="4px" />
        </HeaderStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <br />
    <dx:ASPxPanel ID="ASPxPanel5" runat="server" Height="67px" Width="290px">
        <panelcollection>
            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
            
            <table>
                <tr>

                    <td style="width: 282px">
                      <center>
                        <dx:ASPxRadioButtonList ID="rbOpciones" runat="server" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="208px">
                            <Items>
                                <dx:ListEditItem Text="Categoria en %" Value="1" />
                                <dx:ListEditItem Text="Categoria en $" Value="2" />
                            </Items>
                        </dx:ASPxRadioButtonList>
                         </center>    
                    </td>
                </tr>
                <tr>
                    <td style="width: 282px"></td>
                </tr>

                <tr>
                
                    <td style="width: 282px">
                    <center>
                        <dx:ASPxButton ID="btnVerReport" runat="server" Text="Ver Reporte" 
                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue" 
                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                            Width="139px" OnClick="btnVerReport_Click" AutoPostBack="False">
                            <ClientSideEvents Click="function(s, e) {
	PopupReporte.Hide();
}" />
                        </dx:ASPxButton>
                    </center>
                    </td>
                
                </tr>

            </table>
                
            </dx:PanelContent>
        </panelcollection>
    </dx:ASPxPanel>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
    <br />
    <dx:ASPxLoadingPanel ID="LoadingPanel" runat="server" 
        ClientInstanceName="LoadingPanel" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" ImageSpacing="5px" Modal="True" Width="113px">
        <Image Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
        </Image>
    </dx:ASPxLoadingPanel>
    <br />
    <dx:ASPxCallback ID="Callback" runat="server" ClientInstanceName="Callback">
        <ClientSideEvents CallbackComplete="function(s, e) { 
LoadingPanel.Hide(); 
}" />
    </dx:ASPxCallback>
    <br />
    </asp:Content>
